package com.yiban.demo.LoginUser.DAO;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yiban.demo.LoginUser.Entity.InvitationCode;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface InvitationCodeMapper extends BaseMapper<InvitationCode> {

    @Update("update invitation_code set is_used = 1 where content = #{content} and is_used = 0")
    int useCode(String content);
}
